package 蓝桥真题;

public class 数的分解 {
	   static boolean ex(int x){
		      while(x>0){
		    	  if(x%10==2||x%10==4)return false;
		    	  x/=10;
		      }
		      return true;
	   }
       public static void main(String[]args){
    	      int res=0;
    	      System.out.println(System.currentTimeMillis());
    	      for(int i=1;i<2018;i++)
    	    	  for(int j=i+1;j<2018;j++){
    	    		  int k=2019-i-j;
    	    		  if(i<j&&j<k&&ex(i)&&ex(j)&&ex(k))res++;
    	    	  }
    	    			  
    	      System.out.println(System.currentTimeMillis());
    	      System.out.print(res);
       }
}
